#ifndef STROKE_H
#define STROKE_H

#include <QtNetwork/QAbstractSocket>
#include <QtNetwork/QHostAddress>
#include <QtNetwork/QHostInfo>
#include <QtNetwork/QNetworkAddressEntry>
#include <QtNetwork/QTcpServer>
#include <QtNetwork/QTcpSocket>
#include <QtNetwork/QUdpSocket>
#include <QtNetwork/QNetworkConfiguration>
#include <QtNetwork/QNetworkConfigurationManager>
#include <QDateTime>
#include <QPoint>
#include <QVector>

/*Stroke Class:
 * Contains pen setting and points
 * Also contains access methonds
 */
class Stroke
{
public:
    Stroke();                   // Constructor
    QVector <QPoint> m_points;  // Line Points
    QDateTime m_timestamp;      // Time Completed
    int m_penWidth;             // Pen Width
    int m_r;                    // Pen color R component
    int m_g;                    // Pen color G component
    int m_b;                    // Pen color B component

    void addPoint(QPoint);      // Insert the QPoint to the end of the stroke
    void addPoint(int x, int y);// Insert a new QPoint with x,y to end of stroke

    int getR();                 // Returns R color component
    int getG();                 // Returns G color component
    int getB();                 // Returns B color component
    int getPenWidth();          // Returns pen width
    QDateTime getDateTime();    // Returns compleded date/time of stroke

    void setR(int r);           // Set pen color R component
    void setG(int g);           // Set pen color G component
    void setB(int b);           // Set pen color B component
    void setColor(int r, int g, int b);     // Set pen color
    void setPenWidth(int width);            // Set pen width
    void setDateTime(QDateTime timestamp);  // Set date/time completed
};

#endif // STROKE_H
